package com.yuzhi.common.core.domain.model;

import com.yuzhi.common.contant.UserConstants;
import lombok.Data;
import org.hibernate.validator.constraints.Length;

import javax.validation.constraints.NotBlank;

/**
 * 用户登录对象
 *
 * @author auto
 */

@Data
public class PassWordBody {

    private String userId;

    /**
     * 用户名
     */
    @Length(min = UserConstants.PASSWORD_MIN_LENGTH, max = UserConstants.PASSWORD_MAX_LENGTH, message = "密码长度应大于等于5个字符小于等于20个字符")
    private String oldPassword;

    /**
     * 用户密码
     */
    @NotBlank(message = "密码不能为空")
    @Length(min = UserConstants.PASSWORD_MIN_LENGTH, max = UserConstants.PASSWORD_MAX_LENGTH, message = "密码长度应大于等于5个字符小于等于20个字符")
    private String password;

}
